package kr.bae.androidcomplete02.ch14;

import kr.bae.androidcomplete02.R;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class Ch14_AMain extends ListActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.chapter14, android.R.layout.simple_list_item_1);
		setListAdapter(adapter);
		
		
	}

	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		Intent i = null;
		switch (position) {
		case 0:
			i = new Intent(this, SoundEdit.class);
			break;

		default:
			break;
		}
		
		startActivity(i);
	}
}
